<div class="box">  <!-- Box Head -->
    <div class="box-head">
        <h2 class="left">Categories</h2>
        
    </div>
    <!-- End Box Head -->

    <!-- Table -->
    <div class="table">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
            <tbody>
                <tr>

                    <th width="13"><input type="checkbox" class="checkbox"></th>
                    <th>Name</th>
                    <th width="110" class="ac">&nbsp;Control</th>
                </tr>
                <?php
                    include "actions/db_connect.php";
                    $find = mysql_query("select * from `category`");
                    if ( mysql_numrows($find) > 0) {

                        while($display = mysql_fetch_assoc($find) ) {

                            //echo "<pre>";

                            //print_r($display);

                            //echo "</pre>";
                ?>


                <tr class="odd">
                    <td><input type="checkbox" class="checkbox"></td>
                    <td><h3><a href="admin.php?page=news_show&news_id=<?php echo $display['id'];?>"><?php echo $display['name'];?></a></h3></td>
                    <td><a class="ico del" href="actions/cat_deleter.php?cat_id=<?php echo $display['id'];?>">Delete</a>
                        &nbsp;&nbsp;&nbsp;&nbsp;<a href="admin.php?page=cat_edit&cat_id=<?php echo $display['id'];?>">Edit</a></td>

                </tr>


                        <?php
                    }
                }
                ?>
            </tbody></table>



    </div>
    <!-- Table -->
</div>
<div class="box">
    <!-- Box Head -->
    <div class="box-head">
        <h2>Add Category</h2>
    </div>
    <!-- End Box Head -->

    <form action="actions/cat_add.php" method="POST">

        <!-- Form -->
        <div class="form">
            <p>
                <span class="req">max 100 symbols</span>
                <label>Category Name <span>(Required Field)</span></label>
                <input type="text" class="field size1" name="cat_name" value="Your category name goes here . . ." onfocus="blank(this)" onblur="unblank(this)"/>
            </p>     

        </div>
        <!-- End Form -->

        <!-- Form Buttons -->
        <div class="buttons">
            <input type="button" class="button" value="preview" />
            <input type="submit" class="button" value="submit" />
        </div>

        <!-- End Form Buttons -->
    </form>
</div>


